var http = require('http');
var fs = require('fs');

var hostname='127.0.0.1';
var port='3000';

var server = http.createServer(function(req,res){
    console.log(req.url);

    if (req.url == '/meinv') {
        fs.readFile('./imgs/3.jpg',function(err,data){
            res.end(data);
        });
    }else{
        res.writeHead(404,{"Content-Type":"text/html;charset=utf-8"});
        res.end('404 NOT FOUND');
    }
});

server.listen(port,hostname);